package pers.xhh.frontapi.service;

import com.baomidou.mybatisplus.extension.service.IService;
import pers.xhh.frontapi.common.Mi;
import pers.xhh.frontapi.entity.MiOrderEntity;
import pers.xhh.frontapi.entity.to.order.OrderSubmitTo;

/**
 * @author wei-xhh
 * @date 2020-11-22
 */
public interface MiOrderService extends IService<MiOrderEntity> {

    /**
     * 获取确认购物的信息
     * @return 结果
     */
    Mi orderInfo();

    /**
     * 点击确认保存订单
     * @param orderSubmitTo 防重令牌
     * @return 结果
     */
    Mi confirmOrder(OrderSubmitTo orderSubmitTo);

    /**
     * 更新订单状态
     * @param outTradeNo
     * @param code
     */
    boolean updateOrderStatus(String outTradeNo, int code);

    /**
     * 获取我的订单
     * @return
     */
    Mi myOrder(Integer pagenum, Integer pagesize);

    /**
     * 取消订单/删除订单
     * @param orderId
     * @return
     */
    Mi cancelOrder(Integer orderId);
}
